package process_control;

public class P10_for_pro {
    public static void main(String[] args) {
        /*
        JDK5新特性： 增强型for循环/ 简化型for循环
         */

//        遍历数组元素
        int [] numbers = {10, 20, 30, 40, 50};
        for(int x:numbers){
            System.out.println(x);
        }
//        普通for
        for(int i=0; i<numbers.length; i++){
            System.out.println(numbers[i]);
        }

    }
}
